<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      let p1 = new Promise((resovle, reject) => {
        console.log(1);
        resovle(2);
        console.log(3);
      });
      console.log(
        "2222",
        p1.then((res) => {
          console.log(res);
          return 5;
        })
      );

      function bar() {
        // setTimeout(console.log("time"), 1000);
        setTimeout(() => {
          console.log("time");
        }, 1000);
      }

      console.log(bar());
    </script>
  </body>
</html>
